<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>示例14-2</title>
    <script src="jquery.js"></script>
    <script>
        function saveData(){
            $("#username").val("accp")
        }
        function loadData(){
            const username = $("#username").val()
            console.log(username)
            const grade = $("#grade").val()
            console.log(grade)
            const gender = $("[name=gender]:checked").val()
            console.log(gender)
        }
    </script>
</head>
<body>
    <p><input id="username"/></p>
    <p>
        <select id="grade">
            <option value="s1">第一学期</option>
            <option value="s2">第二学期</option>
            <option value="s3">第三学期</option>
        </select>
    </p>
    <p>
        <input type="radio" value="boy" name="gender" checked/>男
        <input type="radio" value="girl" name="gender"/>女
        <input type="radio" value="mask" name="gender"/>保密
    </p>
    <button onclick="saveData()">写入值</button>
    <button onclick="loadData()">读取值</button>
</body>
</html>